home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / dbm / cdefs.h next >
C/C++ Source or Header  |  2006-05-08  |  7KB  |  166 lines

  1. /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2. /* ***** BEGIN LICENSE BLOCK *****
  3.  * Version: NPL 1.1/GPL 2.0/LGPL 2.1
  4.  *
  5.  * The contents of this file are subject to the Netscape Public License
  6.  * Version 1.1 (the "License"); you may not use this file except in
  7.  * compliance with the License. You may obtain a copy of the License at
  8.  * http://www.mozilla.org/NPL/
  9.  *
  10.  * Software distributed under the License is distributed on an "AS IS" basis,
  11.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  12.  * for the specific language governing rights and limitations under the
  13.  * License.
  14.  *
  15.  * The Original Code is mozilla.org code.
  16.  *
  17.  * The Initial Developer of the Original Code is 
  18.  * Netscape Communications Corporation.
  19.  * Portions created by the Initial Developer are Copyright (C) 1998
  20.  * the Initial Developer. All Rights Reserved.
  21.  *
  22.  * Contributor(s):
  23.  *
  24.  *
  25.  * Alternatively, the contents of this file may be used under the terms of
  26.  * either the GNU General Public License Version 2 or later (the "GPL"), or
  27.  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  28.  * in which case the provisions of the GPL or the LGPL are applicable instead
  29.  * of those above. If you wish to allow use of your version of this file only
  30.  * under the terms of either the GPL or the LGPL, and not to allow others to
  31.  * use your version of this file under the terms of the NPL, indicate your
  32.  * decision by deleting the provisions above and replace them with the notice
  33.  * and other provisions required by the GPL or the LGPL. If you do not delete
  34.  * the provisions above, a recipient may use your version of this file under
  35.  * the terms of any one of the NPL, the GPL or the LGPL.
  36.  *
  37.  * ***** END LICENSE BLOCK ***** */
  38.  
  39. /*
  40.  * Copyright (c) 1991, 1993
  41.  *    The Regents of the University of California.  All rights reserved.
  42.  *
  43.  * This code is derived from software contributed to Berkeley by
  44.  * Berkeley Software Design, Inc.
  45.  *
  46.  * Redistribution and use in source and binary forms, with or without
  47.  * modification, are permitted provided that the following conditions
  48.  * are met:
  49.  * 1. Redistributions of source code must retain the above copyright
  50.  *    notice, this list of conditions and the following disclaimer.
  51.  * 2. Redistributions in binary form must reproduce the above copyright
  52.  *    notice, this list of conditions and the following disclaimer in the
  53.  *    documentation and/or other materials provided with the distribution.
  54.  * 3. All advertising materials mentioning features or use of this software
  55.  *    must display the following acknowledgement:
  56.  *    This product includes software developed by the University of
  57.  *    California, Berkeley and its contributors.
  58.  * 4. Neither the name of the University nor the names of its contributors
  59.  *    may be used to endorse or promote products derived from this software
  60.  *    without specific prior written permission.
  61.  *
  62.  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  63.  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  64.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  65.  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  66.  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  67.  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  68.  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  69.  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  70.  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  71.  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  72.  * SUCH DAMAGE.
  73.  *
  74.  *    @(#)cdefs.h    8.7 (Berkeley) 1/21/94
  75.  */
  76.  
  77. #ifndef    _CDEFS_H_
  78. #define    _CDEFS_H_
  79.  
  80. #if defined(__cplusplus)
  81. #define    __BEGIN_DECLS    extern "C" {
  82. #define    __END_DECLS    }
  83. #else
  84. #define    __BEGIN_DECLS
  85. #define    __END_DECLS
  86. #endif
  87.  
  88. /*
  89.  * The __CONCAT macro is used to concatenate parts of symbol names, e.g.
  90.  * with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo.
  91.  * The __CONCAT macro is a bit tricky -- make sure you don't put spaces
  92.  * in between its arguments.  __CONCAT can also concatenate double-quoted
  93.  * strings produced by the __STRING macro, but this only works with ANSI C.
  94.  */
  95. #if defined(__STDC__) || defined(__cplusplus) || defined(_WINDOWS) || defined(XP_OS2)
  96. #define    __P(protos)    protos        /* full-blown ANSI C */
  97. #define    __CONCAT(x,y)    x ## y
  98. #define    __STRING(x)    #x
  99.  
  100. /* On HP-UX 11.00, <sys/stdsyms.h> defines __const. */
  101. #ifndef __const
  102. #define    __const        const        /* define reserved names to standard */
  103. #endif  /* __const */
  104. #define    __signed    signed
  105. #define    __volatile    volatile
  106. #ifndef _WINDOWS
  107. #if defined(__cplusplus)
  108. #define    __inline    inline        /* convert to C++ keyword */
  109. #else
  110. #if !defined(__GNUC__) && !defined(__MWERKS__)
  111. #define    __inline            /* delete GCC keyword */
  112. #endif /* !__GNUC__ */
  113. #endif /* !__cplusplus */
  114. #endif /* !_WINDOWS */
  115.  
  116. #else    /* !(__STDC__ || __cplusplus) */
  117. #define    __P(protos)    ()        /* traditional C preprocessor */
  118. #define    __CONCAT(x,y)    x/**/y
  119. #define    __STRING(x)    "x"
  120.  
  121. #ifndef __GNUC__
  122. #define    __const                /* delete pseudo-ANSI C keywords */
  123. #define    __inline
  124. #define    __signed
  125. #define    __volatile
  126. /*
  127.  * In non-ANSI C environments, new programs will want ANSI-only C keywords
  128.  * deleted from the program and old programs will want them left alone.
  129.  * When using a compiler other than gcc, programs using the ANSI C keywords
  130.  * const, inline etc. as normal identifiers should define -DNO_ANSI_KEYWORDS.
  131.  * When using "gcc -traditional", we assume that this is the intent; if
  132.  * __GNUC__ is defined but __STDC__ is not, we leave the new keywords alone.
  133.  */
  134. #ifndef    NO_ANSI_KEYWORDS
  135. #define    const                /* delete ANSI C keywords */
  136. #define    inline
  137. #define    signed
  138. #define    volatile
  139. #endif
  140. #endif    /* !__GNUC__ */
  141. #endif    /* !(__STDC__ || __cplusplus) */
  142.  
  143. /*
  144.  * GCC1 and some versions of GCC2 declare dead (non-returning) and
  145.  * pure (no side effects) functions using "volatile" and "const";
  146.  * unfortunately, these then cause warnings under "-ansi -pedantic".
  147.  * GCC2 uses a new, peculiar __attribute__((attrs)) style.  All of
  148.  * these work for GNU C++ (modulo a slight glitch in the C++ grammar
  149.  * in the distribution version of 2.5.5).
  150.  */
  151. #if !defined(__GNUC__) || __GNUC__ < 2 || __GNUC_MINOR__ < 5
  152. #define    __attribute__(x)    /* delete __attribute__ if non-gcc or gcc1 */
  153. #if defined(__GNUC__) && !defined(__STRICT_ANSI__)
  154. #define    __dead        __volatile
  155. #define    __pure        __const
  156. #endif
  157. #endif
  158.  
  159. /* Delete pseudo-keywords wherever they are not available or needed. */
  160. #ifndef __dead
  161. #define    __dead
  162. #define    __pure
  163. #endif
  164.  
  165. #endif /* !_CDEFS_H_ */
  166.